package com.zhipu.balance.mobile.event.upgrade;

import com.raizlabs.android.dbflow.annotation.Migration;
import com.raizlabs.android.dbflow.sql.SQLiteType;
import com.raizlabs.android.dbflow.sql.migration.AlterTableMigration;
import com.zhipu.balance.mobile.DBManager;
import com.zhipu.balance.mobile.event.RecordWheat;
import com.zhipu.balance.mobile.event.RecordWheat_Table;

@Migration(version = 9, database = DBManager.class)
public class RecordWheat1 extends AlterTableMigration<RecordWheat> {


    public RecordWheat1(Class<RecordWheat> table) {
        super(table);
    }


    @Override
    public void onPreMigrate() {        super.onPreMigrate();
        addColumn(SQLiteType.TEXT, RecordWheat_Table.deviceId.getNameAlias().name());


        addColumn(SQLiteType.TEXT, RecordWheat_Table.insectBoredQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.insectBoredResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.mottledQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.mottledResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.thermalDamageGrainQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.thermalDamageGrain.getNameAlias().name());

        addColumn(SQLiteType.TEXT, RecordWheat_Table.brokenQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.brokenResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.sproutWeight.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.sproutResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.moldWeight.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.moldResult.getNameAlias().name());


        addColumn(SQLiteType.TEXT, RecordWheat_Table.mildewGrainQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordWheat_Table.mildewGrain.getNameAlias().name());
    }
}